import React, { Component } from 'react'
import {getSwiperto} from '../../servers'
import './swip.less'
export default class Swiper_tu extends Component {
    constructor(){
        super(),
        this.state = {
          data:[]
        }
      }
      
      componentDidMount() {
        getSwiperto()
            .then((resp)=>{
                
             this.setState({
               data:resp.data.data
             })
            })
        
      }
  render() {
    return (
      <div className="swip">
       {this.state.data.map((item)=>{
                  return (
                    <div key={item.id}>
                    <img  src={item.img}  />
                    <span>{item.title}</span>
                    <span>${item.price}</span>
                    </div> 
                          )
                 })
                }
      </div>
    )
  }
}
